<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head th:include="common/header"></head>
<body>
	<div class="layui-fluid">

		<!-- 导航菜单 -->
		<div th:replace="common/system/system_fragment :: system_menu('人员管理')"></div>

		<!-- 当前位置 -->
		<div th:replace="common/system/system_fragment :: system_locations('人员管理', '用户管理', '查看信息')"></div>
		
		<div class="layui-row  yy-margin-top-10">
		
			<fieldset>
				<legend><a>基本信息</a></legend>
			
				<form class="layui-form" action="/user/saveuser" method="post">
				<!-- 查询 -->
					<div class="layui-colla-item">
						<div class="layui-form layui-form-pane">
							<input type="hidden" name="id" th:value="${user.id}">
							
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">帐号</label>
									<div class="layui-input-inline">
										<input th:value="${user.account}" type="text" name="account" autocomplete="off" class="layui-input" lay-verify="required|length50" placeholder="请输入帐号">
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">姓名</label>
									<div class="layui-input-inline">
										<input th:value="${user.name}" type="text" name="name" autocomplete="off" class="layui-input" lay-verify="required|length50" placeholder="请输入姓名">
									</div>
								</div>
							</div>
							
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">状态</label>
									<div class="layui-input-inline">
										<input type="radio" name="status" title="正常" value="1" th:checked="${ (user.status eq '1') or ( user.status ne '1' and user.status ne '2' )}" />
										<input type="radio" name="status" title="锁定" value="2" th:checked="${user.status eq '2'}" />
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">性别</label>
									<div class="layui-input-inline">
										<input type="radio" name="sex" title="男" value="1" th:checked="${ (user.sex eq '1') or ( user.sex ne '1' and user.sex ne '2' )}" />
										<input type="radio" name="sex" title="女" value="2" th:checked="${user.sex eq '2'}" />
									</div>
								</div>
							</div>
							
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">邮箱</label>
									<div class="layui-input-inline">
										<input th:value="${user.email}" type="text" name="email" autocomplete="off" class="layui-input" lay-verify="required|email" placeholder="请输入邮箱">
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">电话</label>
									<div class="layui-input-inline">
										<input th:value="${user.phone}" type="text" name="phone" autocomplete="off" class="layui-input" lay-verify="required|phone" placeholder="请输入电话">
									</div>
								</div>
							</div>
							
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">生日</label>
									<div class="layui-input-inline">
										<input th:value="${#dates.format(user.birthday, 'yyyy-MM-dd')}" type="text" id="birthday" readonly="readonly" name="birthday" autocomplete="off" class="layui-input" placeholder="请输选择出生日期">
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label layui-bg-orange">民族</label>
									<div class="layui-input-inline">
										<input th:value="${user.folk}" type="text" name="folk" autocomplete="off" class="layui-input" lay-verify="length50" placeholder="请输入民族">
									</div>
								</div>
							</div>
							
							<div class="layui-form-item">
								<label class="layui-form-label layui-bg-orange">地址</label>
								<div class="layui-input-block">
									<input th:value="${user.address}" type="text" name="address" autocomplete="off" class="layui-input" lay-verify="length200" placeholder="请输选择出生地址">
								</div>
							</div>
							
							<div class="layui-form-item">
								<label class="layui-form-label layui-bg-orange">头像</label>
								<div class="layui-input-block">
									<input type="hidden" name="photo" autocomplete="off" th:value="${user.photo}">
									<img th:src="${user.photo}" id="userPhoto" class="layui-upload-drag"/>
								</div>
							</div>
							
							<!-- 提交及取消按钮 -->
							<div class="layui-form-item">
								<div class="layui-input-block">
									<a class="layui-btn yy-float-right" href="javascript:history.go(-1);">返回</a>
								</div>
							</div>
						</div>
					</div>
				</form>
			</fieldset>
		</div>
	</div>

	<!-- 引入js -->
	<div th:replace="common/script"></div>
	
</body>

</html>